Inverter devices that drive an electric motor include a capacitor as a component. The internal resistance of the capacitor increases under a low-temperature environment. If a great input is applied to such an inverter device from the electric motor during, for example, regenerating operation, an internal voltage is increased and internal elements of the inverter device may be destroyed. To avoid such a situation, the temperature of the capacitor needs to be quickly increased to reduce the capacitor internal resistance. For this reason, warm-up control is performed in which, during a startup, an electric current is applied for a few seconds without the electric motor being rotated, and thus generated heat is used to increase the temperature of the capacitor.
For example, Patent Document 1 discloses a method for controlling an electric motor that increases the temperature of a capacitor of an inverter device at a low ambient temperature. Specifically, depending on the ambient temperature of the inverter device, a ripple voltage is generated by the equivalent series resistance of the capacitor. The maximum allowable motor current value at which the components of the inverter device are not damaged by the ripple voltage is set using a map or a relational expression representing a relationship between the maximum value of the motor current and the temperature. If the maximum allowable motor current value set based on the temperature of the capacitor is lower than a value capable of generating torque required for starting the electric motor, the angular position of the rotor of the electric motor is estimated and a direct current lower than or equal to the maximum allowable motor current value is supplied as a d-axis current to increase the temperature of the capacitor of the inverter device. After the maximum allowable motor current value set based on the temperature of the capacitor reaches and exceeds a value capable of generating the torque required for starting the electric motor, the inverter device is controlled to supply alternating currents to the electric motor.